﻿using System;
using System.Collections.Generic;
using System.Text;
using ApiCoreProject.Model.Entities;
using ApiCoreProject.Bll.Interface;
using ApiCoreProject.Dal;

namespace ApiCoreProject.Bll.Implement
{
    class ImagesServe : BaseBll<Image>, IImgaesServe
    {
        public ImagesServe(IBaseDal<Image> dal) : base(dal)
        {
        }

        public Image AddImage(Image image)
        {
            var img= dal.Add(image);
            if (dal.SaveChanges()>0)
            {
                return img;
            }
            else {
                return null;
            }

        }
    }
}
